<% if flash[:error] -%>
	<div class="error">
		<%= image_tag '16x16/error.png', :alt => 'Error', :size => '16x16', :class => 'middle' %>
		<%= flash[:error] %>
	</div>
<% end -%>

<%= form_tag %>
<table class="layout_table">
<tr>
	<td class="right"><label for="username">Username:</label></td>
	<td><%= text_field_tag :username, @username , :class => 'fixed' %></td>
</tr>
<tr>
	<td class="right"><label for="password">Password:</label></td>
	<td><%= password_field_tag :password, '', :class => 'fixed' %></td>
</tr>
<tr>
	<td></td>
	<td>
		<%= submit_tag "Sign in", :class => 'submit' %>
		or
		<% if session[:history] -%>
			<a href="<%= session[:history] %>">cancel</a>
		<% else -%>
			<%= link_to 'cancel', :controller => 'wiki', :action => :index %>
		<% end -%>
	</td>
</tr>
</table>

<%= javascript_tag "$('username').focus();" %>

<%= end_form_tag %>
